﻿// Type: D2L.Extensibility.AuthSdk.D2LAppContextFactory
// Assembly: D2L.Extensibility.AuthSdk, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null
// MVID: B2FBA42B-591C-474F-A782-6FF215FEDFB9
// Assembly location: C:\Users\leandro.perdizo\Desktop\D2L.Extensibility.AuthSdk.dll

using D2L.Extensibility.AuthSdk.Impl;

namespace D2L.Extensibility.AuthSdk
{
  public class D2LAppContextFactory
  {
    private readonly ITimestampProvider m_timestampProvider;

    public D2LAppContextFactory(ITimestampProvider timestampProvider = null)
    {
      this.m_timestampProvider = timestampProvider ?? (ITimestampProvider) new DefaultTimestampProvider();
    }

    public ID2LAppContext Create(string appId, string appKey)
    {
      return (ID2LAppContext) new D2LAppContext(appId, appKey, this.m_timestampProvider);
    }
  }
}
